How to simplify this tuple reconstruction

join shbcf.ru